package models

//post排序类型
const (
	OrderTime  = "time"
	OrderScore = "score"
)

// ParamsSignUp 用户注册参数
type ParamsSignUp struct {
	UserName   string `json:"username" binding:"required"`
	Password   string `json:"password" binding:"required"`
	RePassword string `json:"repassword" binding:"required,eqfield=Password"`
}

// ParamsLogin 用户登录参数
type ParamsLogin struct {
	UserName string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

// ParamsVoteData 投票数据
type ParamsVoteData struct {
	UserID    int64
	PostID    int64 `json:"post_id,string" binding:"required"`
	Direction int8  `json:"direction" binding:"oneof=1 0 -1"`
}

// ParamsPostInOrder 帖子排序参数
type ParamsPostInOrder struct {
	CommunityID string `json:"community_id" form:"community_id" example:"3"` //社区id
	PageSize    int64  `json:"page_size" form:"page_size" example:"1"`       //页码
	PageCount   int64  `json:"page_count" form:"page_count" example:"5"`     //每页数量
	Order       string `json:"order" form:"order" example:"score"`           //排序方式
}
